<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>
<body>
    <!-- P89 -->
<script type="text/javascript">
    function F(){
        var arr = [],
            i;

        for(i = 0;i < 3;i++){
            arr[i] = function (){
                return i;
            }
        }
        return arr;
    }

    var arr = F();

    console.log(arr[0]());
    console.log(arr[1]());
    console.log(arr[2]());
</script>
    <!-- P90 -->
<script>
    function F(){
        var arr = [],
            i;

        for(i = 0;i < 3;i ++){
            arr[i] = (function(x){
                return function(){
                    return x;
                }
            }(i));
        }
        return arr;
    }

    var arr = F();
    console.log(arr[0]());
    console.log(arr[1]());
    console.log(arr[2]());
</script>
    <!-- P91 -->
<script type="text/javascript">
    function F(){
        function binder(x){
            return function(){
                return x;
            }
        }
        var arr = [],
            i;

        for(i = 0;i < 3;i++){
            arr[i] =  binder(i);
        }
        return arr;
    }
</script>
</body>
</html>
